package com.wxp.dao;

import com.wxp.entity.Unit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
* Created by lewis on 2018-3-1 10:02:14.
*/
@Repository
public interface  UnitDao extends JpaRepository<Unit, java.lang.String>,JpaSpecificationExecutor<Unit> {
       
        
     /**
     *通过主键删除
     */   
     @Query("delete from Unit u where u.unitCode = :unitCode")
	 @Modifying
	 public void deleteUser(@Param("unitCode")String unitCode);
}
